3.474 \(\int \frac{(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^3} \, dx\)

Optimal. Leaf size=125 \[ -\frac{\left (2 c^2+6 c d+7 d^2\right ) \cos (e+f x)}{15 f \left (a^3 \sin (e+f x)+a^3\right )}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{5 f (a \sin (e+f x)+a)^3}-\frac{(c-d) (2 c+5 d) \cos (e+f x)}{15 a f (a \sin (e+f x)+a)^2} \]

[Out]

-((c - d)*(2*c + 5*d)*Cos[e + f*x])/(15*a*f*(a + a*Sin[e + f*x])^2) - ((2*c^2 + 6*c*d + 7*d^2)*Cos[e + f*x])/(
15*f*(a^3 + a^3*Sin[e + f*x])) - ((c - d)*Cos[e + f*x]*(c + d*Sin[e + f*x]))/(5*f*(a + a*Sin[e + f*x])^3)

________________________________________________________________________________________

Rubi [A]  time = 0.181693, antiderivative size = 125, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.12, Rules used = {2760, 2750, 2648} \[ -\frac{\left (2 c^2+6 c d+7 d^2\right ) \cos (e+f x)}{15 f \left (a^3 \sin (e+f x)+a^3\right )}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{5 f (a \sin (e+f x)+a)^3}-\frac{(c-d) (2 c+5 d) \cos (e+f x)}{15 a f (a \sin (e+f x)+a)^2} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*Sin[e + f*x])^2/(a + a*Sin[e + f*x])^3,x]

[Out]

-((c - d)*(2*c + 5*d)*Cos[e + f*x])/(15*a*f*(a + a*Sin[e + f*x])^2) - ((2*c^2 + 6*c*d + 7*d^2)*Cos[e + f*x])/(
15*f*(a^3 + a^3*Sin[e + f*x])) - ((c - d)*Cos[e + f*x]*(c + d*Sin[e + f*x]))/(5*f*(a + a*Sin[e + f*x])^3)

Rule 2760

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[((
b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*x]))/(a*f*(2*m + 1)), x] + Dist[1/(a*b*(2*m +
1)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[a*c*d*(m - 1) + b*(d^2 + c^2*(m + 1)) + d*(a*d*(m - 1) + b*c*(m + 2
))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && LtQ[m
, -1]

Rule 2750

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((b
*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(a*f*(2*m + 1)), x] + Dist[(a*d*m + b*c*(m + 1))/(a*b*(2*m + 1)
), Int[(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 -
b^2, 0] && LtQ[m, -2^(-1)]

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin{align*} \int \frac{(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^3} \, dx &=-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{5 f (a+a \sin (e+f x))^3}-\frac{\int \frac{-a \left (2 c^2+4 c d-d^2\right )-a d (c+4 d) \sin (e+f x)}{(a+a \sin (e+f x))^2} \, dx}{5 a^2}\\ &=-\frac{(c-d) (2 c+5 d) \cos (e+f x)}{15 a f (a+a \sin (e+f x))^2}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{5 f (a+a \sin (e+f x))^3}+\frac{\left (2 c^2+6 c d+7 d^2\right ) \int \frac{1}{a+a \sin (e+f x)} \, dx}{15 a^2}\\ &=-\frac{(c-d) (2 c+5 d) \cos (e+f x)}{15 a f (a+a \sin (e+f x))^2}-\frac{\left (2 c^2+6 c d+7 d^2\right ) \cos (e+f x)}{15 f \left (a^3+a^3 \sin (e+f x)\right )}-\frac{(c-d) \cos (e+f x) (c+d \sin (e+f x))}{5 f (a+a \sin (e+f x))^3}\\ \end{align*}

Mathematica [A]  time = 0.113856, size = 84, normalized size = 0.67 \[ -\frac{\cos (e+f x) \left (\left (2 c^2+6 c d+7 d^2\right ) \sin ^2(e+f x)+6 \left (c^2+3 c d+d^2\right ) \sin (e+f x)+7 c^2+6 c d+2 d^2\right )}{15 a^3 f (\sin (e+f x)+1)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*Sin[e + f*x])^2/(a + a*Sin[e + f*x])^3,x]

[Out]

-(Cos[e + f*x]*(7*c^2 + 6*c*d + 2*d^2 + 6*(c^2 + 3*c*d + d^2)*Sin[e + f*x] + (2*c^2 + 6*c*d + 7*d^2)*Sin[e + f
*x]^2))/(15*a^3*f*(1 + Sin[e + f*x])^3)

________________________________________________________________________________________

Maple [A]  time = 0.062, size = 139, normalized size = 1.1 \begin{align*} 2\,{\frac{1}{f{a}^{3}} \left ( -1/5\,{\frac{4\,{c}^{2}-8\,cd+4\,{d}^{2}}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{5}}}+2\,{\frac{c \left ( c-d \right ) }{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{2}}}-1/4\,{\frac{-8\,{c}^{2}+16\,cd-8\,{d}^{2}}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{4}}}-{\frac{{c}^{2}}{\tan \left ( 1/2\,fx+e/2 \right ) +1}}-1/3\,{\frac{8\,{c}^{2}-12\,cd+4\,{d}^{2}}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{3}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^3,x)

[Out]

2/f/a^3*(-1/5*(4*c^2-8*c*d+4*d^2)/(tan(1/2*f*x+1/2*e)+1)^5+2*c*(c-d)/(tan(1/2*f*x+1/2*e)+1)^2-1/4*(-8*c^2+16*c
*d-8*d^2)/(tan(1/2*f*x+1/2*e)+1)^4-c^2/(tan(1/2*f*x+1/2*e)+1)-1/3*(8*c^2-12*c*d+4*d^2)/(tan(1/2*f*x+1/2*e)+1)^
3)

________________________________________________________________________________________

Maxima [B]  time = 1.56218, size = 747, normalized size = 5.98 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

-2/15*(c^2*(20*sin(f*x + e)/(cos(f*x + e) + 1) + 40*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 30*sin(f*x + e)^3/(c
os(f*x + e) + 1)^3 + 15*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 7)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1)
+ 10*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)
^4/(cos(f*x + e) + 1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 2*d^2*(5*sin(f*x + e)/(cos(f*x + e) + 1)
+ 10*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1) + 10*a^3*sin(f*x +
e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e)^4/(cos(f*x + e) +
1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 6*c*d*(5*sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin(f*x + e)^2/
(cos(f*x + e) + 1)^2 + 5*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 1)/(a^3 + 5*a^3*sin(f*x + e)/(cos(f*x + e) + 1)
 + 10*a^3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 10*a^3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 5*a^3*sin(f*x + e
)^4/(cos(f*x + e) + 1)^4 + a^3*sin(f*x + e)^5/(cos(f*x + e) + 1)^5))/f

________________________________________________________________________________________

Fricas [B]  time = 1.56926, size = 570, normalized size = 4.56 \begin{align*} -\frac{{\left (2 \, c^{2} + 6 \, c d + 7 \, d^{2}\right )} \cos \left (f x + e\right )^{3} -{\left (4 \, c^{2} + 12 \, c d - d^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, c^{2} + 6 \, c d - 3 \, d^{2} - 3 \,{\left (3 \, c^{2} + 4 \, c d + 3 \, d^{2}\right )} \cos \left (f x + e\right ) -{\left ({\left (2 \, c^{2} + 6 \, c d + 7 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 3 \, c^{2} + 6 \, c d - 3 \, d^{2} + 6 \,{\left (c^{2} + 3 \, c d + d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{15 \,{\left (a^{3} f \cos \left (f x + e\right )^{3} + 3 \, a^{3} f \cos \left (f x + e\right )^{2} - 2 \, a^{3} f \cos \left (f x + e\right ) - 4 \, a^{3} f +{\left (a^{3} f \cos \left (f x + e\right )^{2} - 2 \, a^{3} f \cos \left (f x + e\right ) - 4 \, a^{3} f\right )} \sin \left (f x + e\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/15*((2*c^2 + 6*c*d + 7*d^2)*cos(f*x + e)^3 - (4*c^2 + 12*c*d - d^2)*cos(f*x + e)^2 - 3*c^2 + 6*c*d - 3*d^2
- 3*(3*c^2 + 4*c*d + 3*d^2)*cos(f*x + e) - ((2*c^2 + 6*c*d + 7*d^2)*cos(f*x + e)^2 - 3*c^2 + 6*c*d - 3*d^2 + 6
*(c^2 + 3*c*d + d^2)*cos(f*x + e))*sin(f*x + e))/(a^3*f*cos(f*x + e)^3 + 3*a^3*f*cos(f*x + e)^2 - 2*a^3*f*cos(
f*x + e) - 4*a^3*f + (a^3*f*cos(f*x + e)^2 - 2*a^3*f*cos(f*x + e) - 4*a^3*f)*sin(f*x + e))

________________________________________________________________________________________

Sympy [A]  time = 29.6415, size = 1248, normalized size = 9.98 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))**2/(a+a*sin(f*x+e))**3,x)

[Out]

Piecewise((6*c**2*tan(e/2 + f*x/2)**5/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**
3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 20*c**2*t
an(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2
)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 10*c**2*tan(e/2 + f*x/2)/(15
*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(
e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 8*c**2/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*
tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*
x/2) + 15*a**3*f) - 60*c*d*tan(e/2 + f*x/2)**3/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4
+ 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) -
60*c*d*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2
 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 60*c*d*tan(e/2 + f*x
/2)/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3
*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 12*c*d/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*
a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e
/2 + f*x/2) + 15*a**3*f) - 40*d**2*tan(e/2 + f*x/2)**2/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*
x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a*
*3*f) - 20*d**2*tan(e/2 + f*x/2)/(15*a**3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*t
an(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2 + f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f) - 4*d**2/(15*a**
3*f*tan(e/2 + f*x/2)**5 + 75*a**3*f*tan(e/2 + f*x/2)**4 + 150*a**3*f*tan(e/2 + f*x/2)**3 + 150*a**3*f*tan(e/2
+ f*x/2)**2 + 75*a**3*f*tan(e/2 + f*x/2) + 15*a**3*f), Ne(f, 0)), (x*(c + d*sin(e))**2/(a*sin(e) + a)**3, True
))

________________________________________________________________________________________

Giac [A]  time = 1.26524, size = 244, normalized size = 1.95 \begin{align*} -\frac{2 \,{\left (15 \, c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} + 30 \, c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 30 \, c d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 40 \, c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 30 \, c d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 20 \, d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 20 \, c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 30 \, c d \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 10 \, d^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 7 \, c^{2} + 6 \, c d + 2 \, d^{2}\right )}}{15 \, a^{3} f{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1\right )}^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-2/15*(15*c^2*tan(1/2*f*x + 1/2*e)^4 + 30*c^2*tan(1/2*f*x + 1/2*e)^3 + 30*c*d*tan(1/2*f*x + 1/2*e)^3 + 40*c^2*
tan(1/2*f*x + 1/2*e)^2 + 30*c*d*tan(1/2*f*x + 1/2*e)^2 + 20*d^2*tan(1/2*f*x + 1/2*e)^2 + 20*c^2*tan(1/2*f*x +
1/2*e) + 30*c*d*tan(1/2*f*x + 1/2*e) + 10*d^2*tan(1/2*f*x + 1/2*e) + 7*c^2 + 6*c*d + 2*d^2)/(a^3*f*(tan(1/2*f*
x + 1/2*e) + 1)^5)